<?php
	//dbArch load
	
	//require_once(realpath(dirname(__FILE__) . '/../dbArch/init.php'));
    //load sql
    date_default_timezone_set('PRC');
    $time = date('Y-m-d H:i:s');
	$tasks_sql = 
<<<SQL
insert into tasks (name, from_date, disposed, creator_user_id) values('system','$time', 0, 1),('daytype', '$time', 0, 1);
insert into tasks (name, from_date, disposed, parent_task, creator_user_id) values('windows', '$time', 0, 1, 1), ('linux', '$time', 0, 1, 1), ('unix', '$time', 0, 1, 1);
insert into tasks (name, from_date, disposed, parent_task, creator_user_id) values('yesterday', '$time', 0, 2, 1), ('today', '$time', 0, 2, 1), ('tomorrow', '$time', 0, 2, 1);
SQL;

    //execute sql
    $db = new mysqli('localhost', 'root', '123456', 'se_psts');

    $db->set_charset('utf8');

    $db->multi_query($tasks_sql);
    
    print $db->error;
    
    $db->commit();

    $db->close();

    print "<pre>";

    print "fixture apply successful!\n";

    print "</pre>";